home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
utility
/
603
/
emacs
/
cmd
/
emacs.rc
< prev
next >
Wrap
Text File
|
1992-03-05
|
5KB
|
227 lines
; EMACS.RC: Standard micro Startup program
; for MicroEMACS 3.9d and above
; (C)opyright 1987 by Daniel M Lawrence
; Last Update: 10/20/87
set $discmd FALSE
write-message "[Setting up....]"
; If you screen "SNOWS", comment this line
set $flicker "FALSE"
; To use an IBM-PC EGA card, uncomment the following line
; set $sres "EGA"
; Set Default Global modes
add-global-mode "blue"
add-global-mode "WHITE"
;bind-to-key meta-prefix ` ;for annoying keyboards with ` at the top left
; Toggle function key window display
store-procedure toggle-fkeys
!if %rcfkeys
!goto rcfoff
!endif
; toggle function key window on
save-window
1 next-window
!if &sequal $cbufname "emacs.hlp"
delete-window
!endif
!if ¬ &sequal $cbufname "Function Keys"
1 split-current-window
1 select-buffer "Function Keys"
add-mode "red"
!force 5 resize-window
1 goto-line
!endif
set %rcfkeys TRUE
!force restore-window
!if &sequal $cbufname "Function Keys"
next-window
!endif
write-message "[Function key window ON]"
!return
;Toggle the function key window off
*rcfoff
save-window
1 next-window
!if &sequal "Function Keys" $cbufname
delete-window
!endif
!force restore-window
write-message "[Function key window OFF]"
set %rcfkeys FALSE
!endm
; Bring up Online-help system
store-procedure get-help
set $discmd FALSE
source ehelp.cmd
set $discmd TRUE
!endm
; Load a new page
store-procedure get-page-loader
!if &seq &find newpage.cmd ""
write-message "[Can not find NEWPAGE.CMD]"
!return
!endif
execute-file newpage.cmd
!endm
;procedure to clean out the current page (which is nothing right now)
store-procedure clean
; nothing by default
!endm
; Set up auto CMODE
store-procedure set-default-mode
set %rctmp &sin $cfname "."
!if &equ %rctmp 0
!return
!endif
set %rctmp &mid $cfname &add %rctmp 1 5
!if &or &seq %rctmp "c" &seq %rctmp "h"
add-mode "cmode"
!endif
!if &seq %rctmp "cc"
add-mode "cmode"
!endif
!if &or &seq %rctmp "cpp" &seq %rctmp "hpp"
add-mode "cmode"
!endif
!if &seq %rctmp "mss"
add-mode "wrap"
!endif
!endm
set $readhook set-default-mode
; This function activates the function key window as
; a legitimate place to call up function keys using the mouse
store-procedure mouse-clicks
;remember where we started, and do the mouse movement
save-window
!force mouse-move-down
;If not in the function key window... leave
!if ¬ &sequal $cbufname "Function Keys"
!return
!endif
;First pos is a screen reposition, let it through
!if &and &equ $xpos 0 &equ $ypos 0
restore-window
!return
!endif
;Find out what function key were gonna do
add-mode magic
2 forward-character
set %rctmp $search
!force search-reverse "[fF][0-9]"
!if &seq $status FALSE
delete-mode magic
set $search %rctmp
!return
!endif
;we are on the "f" or "F". Get the function key type and number now
set $search %rctmp
set %fcase lower
!if &equ $curchar 70
set %fcase upper
!endif
1 forward-character
set %fnum &chr $curchar
1 forward-character
set %fnum &cat %fnum &chr $curchar
set %fnum &add %fnum 0
!if &equ %fnum 10
set %fnum "0"
!endif
set %fname &cat "FN" %fnum
!if &seq %fcase upper
set %fname &cat "S-" %fname
!endif
;save the function
set %rccmd &bind %fname
delete-mode MAGIC
;swallow the up-button
set %rctmp >c
;restore the window and exit
restore-window
;procedures don't need the square brackets
!if &seq &left %rccmd 1 "["
set %rccmd &mid %rccmd 2 &sub &len %rccmd 2
%rccmd
!return
!endif
;and then execute it
!force execute-named-command %rccmd
!endm
macro-to-key mouse-clicks MSa
store-procedure mail
execute-file g:\gnu\me3.11\cmd\mail
!endm
macro-to-key mail M-S
; ***** Rebind the Function key group
bind-to-key search-forward FN1
bind-to-key search-reverse FN2
bind-to-key hunt-forward FN3
bind-to-key hunt-backward FN4
macro-to-key toggle-fkeys FN5
macro-to-key get-help FN6
bind-to-key next-window FN7
macro-to-key get-page-loader FN8
bind-to-key save-file FN9
bind-to-key exit-emacs FN0
bind-to-key execute-macro-10 S-FN1
bind-to-key execute-macro-11 S-FN2
bind-to-key execute-macro-12 S-FN3
bind-to-key execute-macro-13 S-FN4
bind-to-key execute-macro-14 S-FN5
bind-to-key execute-macro-15 S-FN6
bind-to-key execute-macro-16 S-FN7
bind-to-key execute-macro-17 S-FN8
bind-to-key execute-macro-18 S-FN9
bind-to-key execute-macro-19 S-FN0
; bring up the function key window
1 split-current-window
select-buffer "Function Keys"
insert-string "f1 search-> f2 <-search ף MicroEMACS: Text Editor~n"
insert-string "f3 hunt-> f4 <-hunt ף ~n"
insert-string "f5 fkeys f6 help ף Available function key Pages include:~n"
insert-string "f7 nxt wind f8 pg[ ] ף Word Box Emacs Pascal C cObal Lisp~n"
insert-string "f9 save f10 exit ף [use the f8 key to load Pages]~n"
unmark-buffer
delete-window
set %rcfkeys FALSE
; toggle-fkeys
; Bind keypad, help and delete keys on ST
execute-file stkeypad.cmd
!force execute-file &cat &cat &env HOME "\" "emacs.hrc"
set $discmd TRUE